package hcn.protocol.ods.casehistory;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

/**
 * @program: 20190427StandardEdition
 *
 * @description: 快递状态
 *
 * @author: zhusm@bsoft.com.cn
 *
 * @create: 2019-06-26 14:57
 **/
@NoArgsConstructor
@AllArgsConstructor
public enum ExpressDeliveryStatusEnum {

    NOTSENT("0","未寄出"),MAILED("1","已寄出"),ORDERING("2","正在下单中"),ORDERED("3","下单成功"),ORDERFAILURE("4","下单失败"),AREANOT("5","该地区不支持");

    private String code;
    private String description;

    public static final ExpressDeliveryStatusEnum getDescription(String code){
        for (ExpressDeliveryStatusEnum type : ExpressDeliveryStatusEnum.values()){
            if (type.getCode().equalsIgnoreCase(code.trim())){
                return type;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }
}
